package com.sy.springboottest.dao;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import com.sy.springboottest.pojo.BaseArea;

public interface BaseAreaReposity  extends CrudRepository<BaseArea, String> {
	@Transactional
    @Query(value = "select * from base_area where length(codeid) =2  ",nativeQuery = true)
	List<BaseArea> findProvices();
	
	List<BaseArea> findByparentid(Integer codeid);
	
}
